package com.mervin.patterns.adapter.objectadapter;

/***************************************
 * @Auther: mervin
 * @Date: 2020-04-20 23:43
 * @Description: 手机充电需要5v接口
 ***************************************/
public class Phone {

    public void charging(IVoltage5V iVoltage5V){
        if(iVoltage5V.output5v() == 5){
            System.out.println("电压为5v，可以充电...");
        }else if(iVoltage5V.output5v() > 5){
            System.out.println("电压大于5v,无法充电...");
        }
    }
}
